package com.onepice.mlp.data.entity;

import lombok.*;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

/**
 * @author FireWang
 * @date 2022/07/11 18:26:57
 */
@Entity
@Table(name = "user")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
@ToString
@EntityListeners(AuditingEntityListener.class)
public class User {
    
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        @Basic
        private Integer id;
    
        @Basic
        private Integer userType;
    
        @Basic
        private String userName;
    
        @Basic
        private String password;
    
        @Basic
        private String phone;
    
        @Basic
        private String avatarUrl;
    
        @Basic
        private String nickName;
    
        @Basic
        private String realName;
    
        @Basic
        private Integer gender;
    
        @Basic
        private String country;
    
        @Basic
        private String province;
    
        @Basic
        private String city;
    
        @Basic
        private String company;
    
        @Basic
        private String language;
    
        @Basic
        private String openId;
    
        @Basic
        private Integer balance;
    
        @Basic
        private Integer bonusPoints;
    
        @Basic
        private String groupId;
    
        @Basic
        private Integer status;
    
        @Basic
        private Integer loginTimes;
    
        @Basic
        private String lastLoginIp;
    
        @Basic
        @CreatedDate
        @Temporal(TemporalType.TIMESTAMP)
        private Date lastLoginTime;
    
        @Basic
        @CreatedDate
        @Temporal(TemporalType.TIMESTAMP)
        private Date createTime;
    
        @Basic
        @CreatedDate
        @Temporal(TemporalType.TIMESTAMP)
        private Date modifyTime;
    
        @Basic
        private String remark;
}
